/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.isil.tia.service.impl;

import com.isil.tia.dao.NominaDao;
import com.isil.tia.domain.Nomina;
import com.isil.tia.service.NominaService;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author Soain01
 */
@Transactional(readOnly = true)
public class NominaServiceImpl implements NominaService {

    private NominaDao nominaDao;

    public void setNominaDao(NominaDao nominaDao) {
        this.nominaDao = nominaDao;
    }

    @Transactional(readOnly = false)
    public void add(Nomina nomina) {
        nominaDao.add(nomina);
    }

    public Nomina get(Integer id) {
        return nominaDao.get(id);
    }

    public Nomina getByIdEmpleado(Integer id) {
        return nominaDao.getByIdEmpleado(id);
    }

    public List<Nomina> loadAll() {
        return nominaDao.loadAll();
    }

    @Transactional(readOnly = false)
    public void update(Nomina nomina) {
        nominaDao.update(nomina);
    }

    @Transactional(readOnly = false)
    public void delete(Integer id) {
        nominaDao.delete(id);
    }
    
    @Transactional(readOnly = false)
    public void deleteByIdEmpleado(Integer id){
        nominaDao.deleteByIdEmpleado(id);
    }
}
